{% extends "challenge_base.html" %}

{% block cards %}
  <h4>My money: {{ game.my_money }}</h4>
  {% if game.i_deal %}
    <div class=img_table_2>
  {% else %}
    <div class=img_table_1>
  {% endif %}
    <table height="450" width="600">
      <tr align="center"><td>
        {% for my_image in my_images %}
          <img src="{{ my_image }}" />
        {% endfor %}
      </td></tr>
      <tr align="center"><td>
      	<h3>{{ game.pot_money }}</h3>
        {% for table_image in table_images %}
          <img src="{{ table_image }}" />
        {% endfor %}
      </td></tr>
      <tr align="center"><td>
        {% for your_image in your_images %}
          <img src="{{ your_image }}" />
        {% endfor %}
      </td></tr>
    </table>    
  </div>
  <h4>Your money: {{ game.your_money }}</h4>
{% endblock cards %}

{% block form %}
  <h4>{{ game.message }}</h4>
  <form action="/challenge" method="post" name="play_bet_form" onsubmit="return checkPlayBet();">
    <input type="radio" name="play_bet" value="-1" /> {{ choices.0 }}
    <input type="radio" name="play_bet" value="0" checked /> {{ choices.1 }}
    {% if choices.2 %}
      <input type="radio" name="play_bet" value="1" /> {{ choices.2 }}
      <input type="text" name="bet_amount" value="{{ game.your_money }}" onclick="changeToBet();"/>
    {% endif %}
    <input type="submit" name="submit_button" value="Submit">
  </form>
{% endblock form %}